# https://gitee.com/yueyinqiu5990/codes-for-tj10053104/blob/master/supplement1/question4/main.py
import math


def _main():
    input_string = input("边长a,边长b,夹角度数：")
    a, b, theta = map(float, input_string.split(","))
    theta = theta * math.pi / 180
    c_square = a ** 2 + b ** 2 - 2 * a * b * math.cos(theta)
    print("边长c：", c_square ** 0.5)


if __name__ == "__main__":
    _main()
